home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / abaqus.vim < prev    next >
Encoding:
Text File  |  2001-05-11  |  1.6 KB  |  55 lines

  1. " Vim syntax file
  2. " Language:    Abaqus finite element input file (www.hks.com)
  3. " Maintainer:    Carl Osterwisch <osterwischc@asme.org>
  4. " Last Change:    1 May 2001, Updated for Vim 6 compatibility, added folding
  5.  
  6. " For version 5.x: Clear all syntax items
  7. " For version 6.x: Quit when a syntax file was already loaded
  8. if version < 600
  9.   syntax clear
  10. elseif exists("b:current_syntax")
  11.   finish
  12. endif
  13.  
  14. " Abaqus comment lines
  15. syn match abaqusComment    "^\*\*.*$"
  16.  
  17. " Abaqus keyword lines
  18. syn match abaqusKeywordLine "^\*\h.*" contains=abaqusKeyword,abaqusParameter,abaqusValue display
  19. syn match abaqusKeyword "^\*\h[^,]*" contained display
  20. syn match abaqusParameter ",[^,=]\+"lc=1 contained display
  21. syn match abaqusValue    "=\s*[^,]*"lc=1 contained display
  22.  
  23. " Illegal syntax
  24. syn match abaqusBadLine    "^\s\+\*.*" display
  25.  
  26. " Folding
  27. if version >= 600
  28.   syn region foldData start="^\*\h" end="^\*\h"me=s-1 transparent fold
  29.   syn sync fromstart
  30.   set foldmethod=syntax
  31. endif
  32.  
  33. " Define the default highlighting.
  34. " For version 5.7 and earlier: only when not done already
  35. " For version 5.8 and later: only when an item doesn't have highlighting yet
  36. if version >= 508 || !exists("did_abaqus_syn_inits")
  37.     if version < 508
  38.         let did_abaqus_syn_inits = 1
  39.         command -nargs=+ HiLink hi link <args>
  40.     else
  41.         command -nargs=+ HiLink hi def link <args>
  42.     endif
  43.  
  44.     " The default methods for highlighting.  Can be overridden later
  45.     HiLink abaqusComment    Comment
  46.     HiLink abaqusKeyword    Statement
  47.     HiLink abaqusParameter    Identifier
  48.     HiLink abaqusValue    Constant
  49.     HiLink abaqusBadLine Error
  50.  
  51.     delcommand HiLink
  52. endif
  53.  
  54. let b:current_syntax = "abaqus"
  55.